import request from '@/utils/request'

const api_name = '/admin/zhou/equipment/findEquipmentPage'


// 分页列表
export const GetEquipmentListByPage = (page, limit, queryDto) => {
  return request({
    url: `${api_name}/${page}/${limit}`,
    method: 'get',
    params:queryDto
  })
}

// 新增设备的方法
export const SaveEquipment = (data) => {
  return request({
      url: '/admin/zhou/equipment/saveEquipment',
      method: "post",
      data
  })
}

export const UpdateEquipment = (data) => {
  return request({
      url: '/admin/zhou/equipment/updateEquipment',
      method: 'put',
      data
  })
}

export const DeleteEquipmentById = (id) => {
  return request({
      url: '/admin/zhou/equipment/delEquipment/' + id,
      method: 'delete'
  })
}

  export const findStates = (id) => {
    return request({
        url: '/admin/zhou/equipment/findStates/' + id,
        method: 'get'
    })
  }

  export const updateStates = (id) => {
    return request({
      url: '/admin/zhou/equipment/updateStates/' + id,
      method: 'delete'
  })
  }

  export const StartEquipmentById = (id) => {
      return request({
        url: '/admin/zhou/equipment/updateStart/' + id,
        method: 'delete'
    })
    }